/*
    main.me -- MakeMe file for the Embedthis Http Library
 */

Me.load({
    makeme: '>=0.9.0',

    plugins: [ 'installs' ],

    blend: [
        'src/*/*.me',
        'src/http.me',
        'test/test.me',
        'doc/doc.me',
    ],

    configure: {
        requires:  [ 'osdep', 'mpr', 'pcre' ],
        discovers: [ 'ssl', ],
    },

    customize: [
        /* Optionally load this if present. Feel free to create and customize */
        'custom.me',
    ],

    settings: {
        integrate: true,
        prefixes: 'install-prefixes',
    
        http: {
            cmd: true,
            pam: true,
            webSockets: true,
        }
    },

    usage: {
        'http.pam': 'Enable Unix Pluggable Auth Module (true|false)',                              
        'http.webSockets': 'Enable WebSockets (true|false)',                              
    },

    targets: {
        projects: {
            action: `genProjects('')`,
        },

        mine: {
            action: `genProjects('', 'mine', Config.OS + '-' + Config.CPU)`,
        }
    },

    manifest: {
        packages: {
            pak: {
                inherit:    'package-manifest',
                prefixes:   [ 'src'],
                sets:       [ 'pak' ],
            },
        },
        sets: { 
            pak: [
                {   
                    from:       'src/dist.me', 
                    to:         '${src}/dist/http.me',

                }, {
                    from:       [
                                    'src/http.h', 
                                    'src/http.c'
                                ],
                    to:         '${src}/dist/',
                    flatten:    true,

                }, {
                    from:       ['src/service.c', 'src/*.c'],
                    exclude:    /http.c/,
                    to:         '${src}/dist/httpLib.c',
                    append:     true,
                    filter:     /^#inc.*http.*$/mg,
                    header:     '/*\n * ${settings.title} Library Source\n */\n\n#include \"http.h\"',
                    divider:    true,

                }, {
                    from:       ['doc/api/http.html', 'doc/api/http*.tags', 'doc/api/http.dtags'],
                    to:         '${src}/doc/api/',
                    relative:   'doc/api',

                }, {
                    from:       'doc/contents/man/http.1',
                    to:         '${src}/doc/contents/man/',
                    relative:   'doc/contents/man',

                },
            ],
        },
	},
})
